package designmode.design2;


/**
 * 鸟
 *
 * @author lfg
 * @version 1.0
 */
public class Bird extends Animal {

    private double flySpeed;

    /**
     * 需要飞多久
     */
    public double getFlyTime(double distance) {
        return distance / flySpeed;
    }

    public double getFlySpeed() {
        return flySpeed;
    }

    public void setFlySpeed(double flySpeed) {
        this.flySpeed = flySpeed;
    }
}
